// import {Actions} from "react-native-router-flux/index";

/**
 * Created by charlie on 18-1-24.
 */
export default {
    namespace:'projectDetail',
    state:{
      thisUrl:'',
      prjId:'',
      webViewPath:''
    },
    subscriptions:{

    },
    effects:{
      *getBasicPath({payload},{select,put,call}){
        const {prjId,thisUrl} = yield select(state =>state.projectDetail);
        let path = thisUrl+'/f/prj/tbprojectinfo/projectView?id='+prjId
        yield put({type:'getSuccess',payload:path})
      }
    },
    reducers:{
      getUrl(state,{payload}){
          return{...state,thisUrl:payload}
      },
      getPrjId(state,{payload}){
        return{...state,prjId:payload}
      },
      getSuccess(state,{payload}){
        return{...state,webViewPath:payload}
      },
    }
}